package br.com.lh.ura.database;

import java.io.Serializable;

import br.com.locaweb.pabx.core.models.Extension_;

public class FlexExtension implements Serializable {

	private static final int MAX_SIZE_ALLOWED = 22;

	private static final long serialVersionUID = 1L;

	public Integer data;
	public String label;

	public FlexExtension() {

	}

	public FlexExtension(Extension_ extension) {
		data = extension.getId();
		String comboText = extension.getComboText();
		label = comboText.length() > MAX_SIZE_ALLOWED ? comboText
				.substring(0, MAX_SIZE_ALLOWED -1)	+ "..." : comboText;
	}
}
